package com.demo.demo4;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

/**
 * Spring 声明式事务管理（基于注解的方式）转账案例测试类
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext4.xml")
public class testDemo4 {
    @Resource(name = "accountService")
    private AccountService accountService;
    @Test
    public void demo4 () {
        accountService.transfer("aaa", "bbb", 200d);
    }
}
